package com.yuyue.springFramework.note13;

import com.yuyue.springFramework.note13.entity.example.MyComponent1;
import com.yuyue.springFramework.note13.entity.example.MyConfig;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 《Spring-13 @ComponentScan相关注解源码解析》文章代码
 *  文章地址：https://mp.weixin.qq.com/s/7vYHA0fgQcupCZpWQ6JGVw
 */
public class Note13Test {
    @Test
    //debug 源码使用
    public void fun(){
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(MyConfig.class);
        applicationContext.refresh();

        System.out.println(applicationContext.getBean(MyComponent1.class));
    }

}
